
<div class="uk-layui-form" style="overflow-x: hidden;">
	<div id="xiaoetopic">
	<h1>
		<form class="layui-form" style="position: absolute;right: 5px; top: 0px;z-index: 100;" name="contactsFormListSubmit" action="/apps/xiaoe/knowledge/topiclist.html?aiid=${aiid!''}&type=${type!''}&id=${id!''}"  method="post" data-toggle="ajax-form" data-close="false" data-target="#mainajaxwin">
			<div class="layui-form-item" style="height: 35px;">
				<div class="layui-inline">
					<div class="layui-input-inline">
						<input type="text" name="q" value="${q!''}" style="height: 30px;line-height: 30px;margin-top: 4px;" placeholder="请输入查询条件" autocomplete="off" class="layui-input">
						<i class="layui-icon" onClick="$('#contactsFormListSubmit').click();" style="position: absolute;cursor: pointer;right: 3px;top: 4px;font-size: 20px;color:#32c24d;">&#xe615;</i>
					<button type="submit" id="contactsFormListSubmit"></button>
					</div>
				</div>
			</div>
		</form>
	</h1>
		<form class="layui-form uk-form" name="contactsSearch" action="/apps/xiaoe/knowledge/topiclist/save.html" method="post" data-toggle="ajax-form" data-close="false" data-target="#mainajaxwin">
			<input type="hidden" name="type" value="${type!''}">
			<input type="hidden" name="aiid" value="${aiid!''}">
			<input type="hidden" name="id" value="${id!''}">
			<div class="row">
				<div class="co-lg-12" style="width: 100%">
					<div class="box default-box" >
						<table class="layui-table" lay-skin="line">
						  <thead>
						  	<#if topicsList?? && topicsList.content?size gt 0 >
							<tr>
								<th>
								  <!-- <input type="checkbox"  id="all" onclick="$('.ids').prop('checked' , $(this).prop('checked'));"/> -->
							  	</th>
							  	<th >标题<#if topicsList?? && topicsList.totalElements gt 0>（${topicsList.totalElements!''}）<#else>（0）</#if></th>
							</tr> 
							</#if>
						  </thead>
						  <tbody class="topic_item">
							<#if topicsList?? && topicsList.content?size gt 0 >
							<#list topicsList.content as topics>
							<tr>
							  <td style="width:1%;">
								<input type="checkbox" class="ids" name="ids"  value="${topics.id!''}" />
							  </td>
							  <td>${topics.title!''}</td>
							</tr>
							</#list>
							<#else>
								<div class="ukefu-empty" style="height: 220px;">
									<i class="layui-icon"></i>
									<div style="">
										还没有知识记录
									</div>
								</div>
							</#if>
						  </tbody>
						</table>
						<div class="layui-form-button" >
							<div class="layui-button-block">
								<button class="layui-btn" lay-submit lay-filter="contactsForm" id="temp">立即提交</button>
								<button type="reset" class="layui-btn" href="/apps/xiaoe/knowledge/topicre.html?aiid=${aiid!''}&id=${id!}&type=${type!''}" data-toggle="load" data-target="#mainajaxwin" >返回</button>
							</div>
						</div>
					</div>
				</div>
			</div>
			<div class="row" shtyle="padding:5px;">
				<div class="col-lg-12" id="page" style="text-align:center;"></div>
			</div>
		</form>
	</div>
</div>
<script>
layui.use('form', function(){
	var form = layui.form;
	form.render(); //更新全部
});
</script>
<script type="text/javascript">
	layui.use(['laypage', 'layer'], function(){
		  var laypage = layui.laypage
		  ,layer = layui.layer;
		  <#if msg??>
		  top.layer.msg('${msg}');
		  </#if>
		  laypage.render({
				elem: 'page'
				,pages: <#if topicsList??>${topicsList.totalPages}<#else>0</#if> //总页数
				,curr:<#if topicsList??>${topicsList.number+1}<#else>0</#if>
				,groups: 5 //连续显示分页数
				,jump:function(data , first){
					if(!first){
						loadURL("/apps/xiaoe/knowledge/topiclist.html?aiid=${aiid!''}&id=${id!}&type=${type!''}&p="+data.curr<#if q!= null && q!= "">+"&q=${q!''}"</#if>,"#xiaoetopic");
					}
				}
		   });
		});
</script>